На главную Наши проекты:
Журнал   ·   Discuz!ML   ·   Wiki   ·   DRKB   ·   Помощь проекту
ПРАВИЛА FAQ Помощь Участники Календарь Избранное RSS
msm.ru
[!] Как относитесь к модерированию на этом форуме? Выскажите свое мнение здесь
  
> Стиль WinXP в проге на Builder 5/6
    Мужики! Кто-нибудь знает, как сделать чтобы объекты созданной проги на Builder 5/6 типа listview, combobox, checkbox и т.д. имели стиль Win XP?

      По FAQ,u

      ********
      На этот вопрос есть два ответа:
      1) Рисовать все самому, используя нововведенные функции
      2) Кое-что добавить в ресурсы!
      ***********


      Можно поподробнее про первый?

      Note При втором на 5ом Buildere глючит TreeView
        ExpandedWrap disabled
          <br>{<br>  To benefit from the new look and feel (Visual Styles) for the Windows XP<br>  environment, you must include a Manifest in your application.<br>  (Either as resource or as file in the same directory where your application<br>  resides)<br><br>  The manifest is a XML document. It will allow Windows XP to decide which<br>  version of the comctl32.dll to use when binding.<br>  The XML document contains information about the application you are<br>  writing as well as information concerning the version of the comctl32.dll to use.<br><br>  The following instruction shows how to<br>   * create the manifest document<br>   * create the XP resource file<br>   * include the file in your application<br><br>  The steps 1-4 show how to create the files.<br>  You can also download the manifest and resource file from the<br>  Demo-download.<br><br>}<br><br>{<br>  Damit eine Anwendung das neue Look-and-Feel (Visual Styles) von Windows XP<br>  annimmt, muss eine Manifest Datei in der Applikation enthalten sein.<br>  (Entweder als Ressource oder im gleichen Verzeichnis, wo sich die Applikation<br>  befindet)<br><br>  Das Manifest ist ein XML Dokument.<br>  Wenn Windows dieses in einer EXE Datei vorfindet, wird automatisch die Version 6<br>  von comctl32.dll geladen und die Controls erscheinen im XP Design.<br><br>  Die Folgende Anleitung zeigt, wie man<br>  * das manifest Dokument erstellt<br>  * die Ressourcen Datei erstellt<br>  * die Ressource in die Anwendung einbindet.<br><br>  Das Manifest und die Ressourcen Datei k?nnen auch ?ber das "Demo-Download" heruntergeladen<br>  werden. Dann k?nnen die Schritte 1-4 ausgelassen werden.<br>}<br><br><br>{1)<br>  Copy this sample manifest and paste it into notepad or any text editor.<br>  Kopiere das Beispiel Manifest und f?ge es in einen Texteditor ein (z.B Notepad}<br><br><br><?xml version="1.0" encoding="UTF-8" standalone="yes"?><br><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"><br><assemblyIdentity<br>    version="1.0.0.0"<br>    processorArchitecture="X86"<br>    name="CompanyName.ProductName.MyProgram"<br>    type="win32"<br>/><br><description>Your Application Description</description><br><dependency><br>    <dependentAssembly><br>        <assemblyIdentity<br>            type="win32"<br>            name="Microsoft.Windows.Common-Controls"<br>            version="6.0.0.0"<br>            processorArchitecture="X86"<br>            publicKeyToken="6595b64144ccf1df"<br>            language="*"<br>        /><br>    </dependentAssembly><br></dependency><br></assembly><br><br>{2)<br>  To customize to fit your application, replace "name" from assemblyIdentity and the<br>  "description" string with your own data. Then save the file as WinXP.manifest<br><br>  ?ndere im Manifest den "name" von assemblyIdentity und die<br>  "description" mit eigenen Angaben. Speichere das Manifest als WinXP.manifest}<br><br>{3)<br>  Create another file which contains instructions to include the<br>  WinXP.manifest (XML) document.<br>  The contents of the WinXP.rc looks like this:<br><br>  Erstelle eine weitere Datei, welche die Instruktionen zur Erstellung<br>  der Ressourcen Datei enth?lt.<br>  Der Inhalt von WinXP.rc schaut so aus:}<br><br><br>  1 24 "WinXP.manifest"<br><br><br>{4)<br><br>  Now we need to use Delphi's resource compiler (brcc32.exe) to compile the WinXP.rc file.<br>  Doing so will result in a WinXP.res<br>  From the command line, type the following:<br><br>  Compilire nun mit Borland's Resource Compiler (brcc32.exe),<br>  die Datei WinXP.rc. Es wird dann eine WinXP.res Datei erstellt.<br>  Gibt im MS-DOS Prompt, im Verzeichnis wo sich WinXP.rc befindet, nun folgendes ein:}<br><br>  brcc32 WinXP.rc<br><br><br>(*5)<br>  Now include the resource in your application.<br>  Include the following compiler directive:<br>  immediately after {$R *.DFM}:<br><br>  Nun muss noch eine Compiler Directive dem Sourcecode hinzugef?gt werden.<br>  Der Eintrag sollte unmittelbar nach der Form Directive {$R *.DFM} folgen,<br>  so wie hier:*)<br><br>  {$R WinXP.res}<br><br><br>{6)<br>  Compile your application and run it!<br>  Compiliere die Anwendung und starte sie!}<br><br><br>{7)<br>  Test it if it runs correctly.<br>  Note that some controls don't adapt the new XP design such<br>  as TGroupBox, TSpeedButton and some others.<br>  If you use the TListView component with the view style of vsReport, have a look at this tip:<br>  http://www.swissdelphicenter.ch/de/showcode.php?id=1117<br><br>  ?berpr?f nun, ob die Anwendung korrekt l?uft. Einige Controls nehmen das neue XP Design<br>  nicht an (TGroupBox, TSpeedButton und andere)<br>  Bei der ListView mit vsReport Style muss dies beachtet werden:<br>  http://www.swissdelphicenter.ch/de/showcode.php?id=1117<br>}
        0 пользователей читают эту тему (0 гостей и 0 скрытых пользователей)
        0 пользователей:


        Рейтинг@Mail.ru
        [ Script execution time: 0,0747 ]   [ 16 queries used ]   [ Generated: 2.05.24, 03:10 GMT ]